//
//  ViewController.m
//  MSQRCode
//
//  Created by iOS on 2017/10/17.
//  Copyright © 2017年 MS. All rights reserved.
//

#import "ViewController.h"
#import "MSQRCodeViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
}
- (IBAction)scanAction:(id)sender {
    MSQRCodeViewController *VC = [[MSQRCodeViewController alloc] init];
    __weak typeof(VC) weakVC = VC;
    VC.QRCodeComplete = ^(NSString *text) {
        NSLog(@"扫描结果：%@", text);
        [weakVC dismissQRCodeVC];
    };
    [self presentViewController:VC animated:YES completion:nil];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
